<?
if (!defined('SMF'))
	die('Hacking attempt...');
	
global $smcFunc, $txt, $scripturl, $user_info;
global $dbtables;

/*
	Verify user login, update player info
	Check if CheckLogin() returned false return to the calling script/function
*/
$playerinfo = CheckLogin();
if ($playerinfo == false)
	return;

BigTitle($txt['bnt_device_title']);

echo '
			<script type="text/javascript">
				$(document).ready(function(){
					// Table sorting function
					$(".bnt_table").tablesorter({
						widgets: ["zebra"]
					});
				});
			</script>
			<p>', $txt['bnt_device_expl'], '</p>
			<table class="bnt_table">
				<thead>
					<tr>
						<th>', $txt['bnt_device'], '</th>
						<th>', $txt['bnt_qty'], '</th>
						<th>', $txt['bnt_usage'], '</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td><a href="', $scripturl, '?action=blacknova;sa=beacon">', $txt['bnt_beacons'], '</a></td>
						<td>', Number($playerinfo['dev_beacon']), '</td>
						<td>', $txt['bnt_manual'], '</td>
					</tr>
					<tr>
						<td><a href="', $scripturl, '?action=blacknova;sa=warpedit">', $txt['bnt_warpedit'], '</a></td>
						<td>', Number($playerinfo['dev_warpedit']), '</td>
						<td>', $txt['bnt_manual'], '</td>
					</tr>
					<tr>
						<td><a href="', $scripturl, '?action=blacknova;sa=genesis">', $txt['bnt_genesis'], '</a></td>
						<td>', Number($playerinfo['dev_genesis']), '</td>
						<td>', $txt['bnt_manual'], '</td>
					</tr>
					<tr>
						<td>', $txt['bnt_deflect'], '</td>
						<td>', Number($playerinfo['dev_minedeflector']), '</td>
						<td>', $txt['bnt_automatic'], '</td>
					</tr>
					<tr>
						<td><a href="', $scripturl, '?action=blacknova;sa=mines;op=1">', $txt['bnt_mines'], '</a></td>
						<td>', Number($playerinfo['torps']), '</td>
						<td>', $txt['bnt_manual'], '</td>
					</tr>
					<tr>
						<td><a href="', $scripturl, '?action=blacknova;sa=mines;op=2">', $txt['bnt_fighters'], '</a></td>
						<td>', Number($playerinfo['ship_fighters']), '</td>
						<td>', $txt['bnt_manual'], '</td>
					</tr>
					<tr>
						<td><a href="', $scripturl, '?action=blacknova;sa=emerwarp">', $txt['bnt_ewd'], '</a></td>
						<td>', ($playerinfo['dev_emerwarp']), '</td>
						<td>', $txt['bnt_manual'], '/', $txt['bnt_automatic'], '</td>
					</tr>
					<tr>
						<td>', $txt['bnt_escape_pod'], '</td><td>', (($playerinfo['dev_escapepod'] == 'y') ? $txt['bnt_yes'] : $txt['bnt_no']), '</td>
						<td>', $txt['bnt_automatic'], '</td>
					</tr>
					<tr>
						<td>', $txt['bnt_fuel_scoop'], '</td><td>', (($playerinfo['dev_fuelscoop'] == 'y') ? $txt['bnt_yes'] : $txt['bnt_no']), '</td>
						<td>', $txt['bnt_automatic'], '</td>
					</tr>
					<tr>
						<td>', $txt['bnt_lssd'], '</td><td>', (($playerinfo['dev_lssd'] == 'y') ? $txt['bnt_yes'] : $txt['bnt_no']), '</td>
						<td>', $txt['bnt_automatic'], '</td>
					</tr>
				</tbody>
			</table>';
?>
